#!/bin/bash

cd tests/e2e-wdio7/


# [E2EHTTPS]
# This is new Webdriver 7, since we're in tests/e2e-wdio7/.  [wdio_6_to_7]
cmd="node_modules/.bin/wdio  wdio.conf.ts  $@"
echo
echo "NODE_TLS_REJECT_UNAUTHORIZED=0  $cmd"
echo
NODE_TLS_REJECT_UNAUTHORIZED=0  $cmd
exit_code=$?

if [ $exit_code -ne 0 ]; then
  echo
  echo
  echo "Error. Webdriverio 7 E2E test failed, exit code: $exit_code"
  echo
  echo "Was started like so:"
  echo "    NODE_TLS_REJECT_UNAUTHORIZED=0  $cmd"
fi

echo
exit $exit_code
